package com.trio.zjq.dao.impl;

import com.trio.zjq.dao.UserInfoDao;
import com.trio.zjq.entity.UserInfo;
import com.trio.zjq.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author 张俊强~.
 * @desc ${DESCRIPTION}.
 * @date 2017/11/21-13:58.
 */
public class UserInfoDaoImpl implements UserInfoDao{


    //获取所有的用户
    public List<UserInfo> findUserList() {
        SqlSession session = MyBatisUtils.getSession();

        List<UserInfo> userList = session.selectList("mapperings.UserInfoMapper.findUserList");

        session.commit();
        session.close();

        return userList;
    }
}
